import { _decorator, Component, Node, UITransform } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('EquipMask')
export class EquipMask extends Component {

    private _equip: Node;
    private _maskEquip: Node;
    private _mask: Node;


    start() {
        this._equip = this.node.getChildByName(`imgEquip`);
        this._mask = this.node.getChildByName(`mask`);
        this._maskEquip = this.node.getChildByName(`imgEquipMask`);
    }

    update(deltaTime: number) {
        let a = this._mask.getComponent(UITransform).height - 1;
        if (a < 0) {
            this._mask.getComponent(UITransform).height = 100;
        } else {
            this._mask.getComponent(UITransform).height = a;
        }

    }
}

